home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / source / zendisk1 / lst9-4.asm < prev    next >
Assembly Source File  |  1990-02-15  |  312b  |  15 lines

  1. ;
  2. ; *** Listing 9-4 ***
  3. ;
  4. ; An example of using CMP reg,0 to test for the
  5. ; zero/non-zero status of a register.
  6. ;
  7.     sub    dx,dx    ;set DX to 0, so we don't jump
  8.     call    ZTimerOn
  9.     rept    1000
  10.     cmp    dx,0    ;is DX 0?
  11.     jnz    $+2    ;just jumps to the next line if
  12.             ; Z is not set (never jumps)
  13.     endm
  14.     call    ZTimerOff
  15.